package com.sxhalo.fsms.mapper;

import com.sxhalo.fsms.domain.DeviceEmRunningData;
import com.sxhalo.fsms.domain.MotorRunningData;
import com.sxhalo.fsms.domain.MotorRunningDataKey;
import com.sxhalo.fsms.domain.RedisData;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface MotorRunningDataMapper {
    int deleteByPrimaryKey(MotorRunningDataKey key);

    int insert(MotorRunningData record);

    int insertSelective(MotorRunningData record);

    MotorRunningData selectByPrimaryKey(MotorRunningDataKey key);

    int updateByPrimaryKeySelective(MotorRunningData record);

    int updateByPrimaryKey(MotorRunningData record);

    List<MotorRunningData> findPhaseHis(@Param("where")String where);
    
    MotorRunningData findLastData(Integer deviceId);
    
    int batchInsert(@Param("list") List<RedisData> list);
    List<HashMap> findAttrHis(@Param("attr")String  attr, @Param("where")String   where);

    int getCount(@Param("where")String where);

    List<MotorRunningData> findWhereList(@Param("where")String where, @Param("order")String order);

    List<MotorRunningData> findPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order);

}